using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using HengTong.Model.Db.Hr.Bill;
using TiaoTaoHelper.Wtm.Models;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.Hr;

/// <summary>
/// 员工履历表
/// 需要关联调岗申请表
/// </summary>
public class SysPersonResume : BasePoco
{
    [Required]
    [Display(Name = "员工ID", Description = "关联员工主键", GroupName = "基本信息")]
    public Guid? PersonId { get; set; }

    [Display(Name = "员工", Description = "关联的员工实体", GroupName = "基本信息")]
    
    public SysPerson Person { get; set; }
    // 关联调岗申请表
    [Display(Name = "调岗申请ID", Description = "关联的调岗申请主键", GroupName = "基本信息")]
    public Guid? TransferRequestId { get; set; }

    [Display(Name = "调岗申请ID", Description = "关联的调岗申请实体", GroupName = "基本信息")]
    public SysHrTransferRequestBill TransferRequest { get; set; }

    [Required]
    [Display(Name = "履历类型", Description = "履历类型，如调岗、晋升等", GroupName = "履历信息")]
    [StringLength(64)]
    public string ResumeType { get; set; }

    [Display(Name = "起始日期", Description = "履历起始日期", GroupName = "履历信息")]
    public DateTime? StartDate { get; set; }

    [Display(Name = "结束日期", Description = "履历结束日期", GroupName = "履历信息")]
    public DateTime? EndDate { get; set; }

    // 原职位信息
    [Display(Name = "原部门", Description = "原部门", GroupName = "原职位信息")]
    public SysGroup OriginalGroup { get; set; }

    [Display(Name = "原部门", Description = "原部门", GroupName = "原职位信息")]
    public Guid? OriginalGroupId { get; set; }

    [Display(Name = "原岗位", Description = "原岗位", GroupName = "原职位信息")]
    public SysJobPosition OriginalPosition { get; set; }

    [Display(Name = "原岗位", Description = "原岗位", GroupName = "原职位信息")]
    public Guid? OriginalPositionId { get; set; }


    [Display(Name = "原职级", Description = "原职级", GroupName = "原职位信息")]
    [StringLength(128)]
    public string OriginalRank { get; set; }

    [Display(Name = "原基本薪资", Description = "原基本薪资", GroupName = "原职位信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? OriginalBaseSalary { get; set; }

    [Display(Name = "原岗位薪资", Description = "原岗位薪资", GroupName = "原职位信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? OriginalPositionSalary { get; set; }

    [Display(Name = "原绩效薪资", Description = "原绩效薪资", GroupName = "原职位信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? OriginalPerformanceSalary { get; set; }

    // 调整后信息
    [Display(Name = "新部门", Description = "新部门", GroupName = "调整后信息")]
    public SysGroup NewGroup { get; set; }

    [Display(Name = "新部门", Description = "新部门", GroupName = "调整后信息")]
    public Guid? NewGroupId { get; set; }

    [Display(Name = "新岗位", Description = "新岗位", GroupName = "调整后信息")]
    public SysJobPosition NewPosition { get; set; }

    [Display(Name = "新岗位", Description = "新岗位", GroupName = "调整后信息")]
    public Guid? NewPositionId { get; set; }


    [Display(Name = "新职级", Description = "新职级", GroupName = "调整后信息")]
    [StringLength(128)]
    public string NewRank { get; set; }

    [Display(Name = "新基本薪资", Description = "新基本薪资", GroupName = "调整后信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? NewBaseSalary { get; set; }

    [Display(Name = "新岗位薪资", Description = "新岗位薪资", GroupName = "调整后信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? NewPositionSalary { get; set; }

    [Display(Name = "新绩效薪资", Description = "新绩效薪资", GroupName = "调整后信息")]
    [Column(TypeName = "decimal(10,2)")]
    public decimal? NewPerformanceSalary { get; set; }


    [Display(Name = "调整原因", Description = "调整原因", GroupName = "履历信息")]
    [StringLength(512)]
    public string TransferReason { get; set; }

    [Display(Name = "备注", Description = "履历备注", GroupName = "履历信息")]
    [StringLength(256)]
    public string Remark { get; set; }
    
    [Display(Name = "原部门岗位", Description = "原部门和岗位的完整信息", GroupName = "原职位信息")]
    [StringLength(256)]
    public string OriginalDepartmentPosition { get; set; }

    [Display(Name = "新部门岗位", Description = "新部门和岗位的完整信息", GroupName = "调整后信息")]
    [StringLength(256)]
    public string NewDepartmentPosition { get; set; }
}